<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of MultimediaHandler
 *
 * @author Rino7
 */

require_once dirname(__FILE__) . '/../../../../../../../DAL/SQLHelper.php';

class MultimediaHandler {
    
    private static $_instance;
    /**
     *
     * @var SQLHelper 
     */
    private static $_sqlHelper;
    
    private function __construct()
    {
	self::$_sqlHelper = SQLHelper::getInstance();
    }
    
    public static function getInstance()
    {
	if(is_null(self::$_instance)) {
	    self::$_instance = new MultimediaHandler();
	}
	return self::$_instance;
    }
    
    private function _getRelativePath($path)
    {
	//Find advf directory and extract forward
    }
    
    public function insertImage(array $fileInformation)
    {
	$storeFileInformation = "INSERT INTO advf SET nombre = '" . $fileInformation["name"] . "', link = '" . $fileInformation["path"] . "'";
	SQLHelper::getInstance()->executeSaveQuery($storeFileInformation);
    }
}

?>
